package org.finesys.common.log.trace.proxy;

import org.aspectj.lang.ProceedingJoinPoint;
import org.finesys.common.log.trace.handler.AroundLogHandler;
import org.finesys.common.log.trace.proxy.impl.AroundLogProxyChainImpl;

public class AopInterceptor {


    private final AroundLogHandler aroundLogHandler;

    public AopInterceptor(AroundLogHandler aroundLogHandler) {
        this.aroundLogHandler = aroundLogHandler;
    }

    public Object proceed(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
        return aroundLogHandler.around(new AroundLogProxyChainImpl(proceedingJoinPoint));
    }
}
